<?php
  /***************************************************************
   * @file: index.php
   * @author: Neo
   * @mail: xq262144@gmail.com
   * @date: 
   * @description:
   * this file is the common entry of the framework
   ***************************************************************/
  //define the error_reporting level
  //please un-comment the comment if you want to enter the production mode
  //begin production mode comment
  /*
  error_reporting(E_ALL & ~E_NOTICE);
  ini_set('display_errors', 'off');
  ini_set('log_errors', 'on');
  ini_set('html_errors', 'off');
  ini_set('ignore_repeated_errors', 'on');
  ini_set('ignore_repeated_source', 'on');
  */
  //end production mode comment
  
  //this program default in develop mode, if you want to make it as a product, please comment following
  //begin develop mode comment
  ob_start();
  
  error_reporting(E_ALL);
  ini_set('display_errors','on');
  ini_set('html_errors', 'on');
  ini_set('log_errors', 'off');
  date_default_timezone_set('PRC'); 
  
  //end development comment
  
  //this program sets the basepath and the global information of the 
  define('SYS_BASEPATH', str_replace('\\', '/', dirname(__FILE__)));
  define('SYS_LIB', SYS_BASEPATH . '/lib');
  define('SYS_HELPER', SYS_BASEPATH . '/helper');
  define('SYS_PUBLIC', SYS_BASEPATH . '/public');
  define('SYS_CONTROLLER', SYS_BASEPATH . '/application/controller');
  define('SYS_MODEL', SYS_BASEPATH . '/application/model');
  define('SYS_VIEW', SYS_BASEPATH . '/application/view');
  define('SYS_CONFIG', SYS_BASEPATH . '/config');
  
  //get main settings
  require_once(SYS_CONFIG . '/config.php');
  require_once(SYS_LIB . '/include.php');
  
  //dispatch the url
  require_once(SYS_LIB . '/dispatcher/main.php');

